package com.yhsimon.repository;

import com.yhsimon.entity.Commodity;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CommodityRepository {
    public List<Commodity> findAll(int index, int limit);

    List<Commodity> findByName(@Param("index") int index, @Param("limit") int limit,@Param("name") String name);

    public int count();

    public Commodity findById(int id);

    public void save(Commodity commodity);

    public void deleteById(int id);

    public void update(Commodity commodity);


    int count2(@Param("name") String name);
}
